package com.jnshu.service.impl;

import com.jnshu.constant.Constant;
import com.jnshu.dao.UserTaskRelationMapper;
import com.jnshu.pojo.UserTaskRelation;
import com.jnshu.service.FrontTaskService;
import com.jnshu.tools.HeadUtil;
import com.jnshu.tools.resultUtils.RUtil;
import com.jnshu.tools.resultUtils.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName FrontTaskServiceImpl
 * @Descrintion
 * @Author bd
 * @Date 2019/8/21 23:48
 * @Version 1.0
 **/
@Service
public class FrontTaskServiceImpl implements FrontTaskService {

    @Autowired(required = false)
    UserTaskRelationMapper userTaskRelationMapper;
    @Autowired(required = false)
    HeadUtil headUtil;

    @Override
    public ResultBean selectByStatus(Long taskId,Long userId) {
        UserTaskRelation userTaskRelation = userTaskRelationMapper.selectByUserId(userId, taskId);
        Integer status = userTaskRelation.getStatus();
        return RUtil.ok(status);
    }
}
